package modelo.sonidos;

import javax.sound.sampled.*;

public class Sonidos {

	private AudioInputStream audio;
	private Clip clip;
	
	
	public void playAudioA(){
		try {
			audio = AudioSystem.getAudioInputStream(Sonidos.class.getResource("/modelo/sonidos/chimpance.wav"));
			clip = AudioSystem.getClip();
			clip.open(audio);
			clip.start();						
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public void playAudioB(){
		try {
			audio = AudioSystem.getAudioInputStream(Sonidos.class.getResource("/modelo/sonidos/click.wav"));
			clip = AudioSystem.getClip();
			clip.open(audio);
			clip.start();						
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public void playAudioC(){
		try {
			audio = AudioSystem.getAudioInputStream(Sonidos.class.getResource("/modelo/sonidos/error.wav"));
			clip = AudioSystem.getClip();
			clip.open(audio);
			clip.start();						
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public void playAudioD(){
		try {
			audio = AudioSystem.getAudioInputStream(Sonidos.class.getResource("/modelo/sonidos/ingresar.wav"));
			clip = AudioSystem.getClip();
			clip.open(audio);
			clip.start();						
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	public void playAudioE(){
		try {
			audio = AudioSystem.getAudioInputStream(Sonidos.class.getResource("/modelo/sonidos/ventas.wav"));
			clip = AudioSystem.getClip();
			clip.open(audio);
			clip.start();						
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	
}
